﻿///<reference path="../_references.ts" />

module ScrambledEggs.Utility {
    export class Number {
        public static Limit(n: number, min: number, max: number): number {
            return Math.min(max, Math.max(n, min));
        }
        public static Random(minInclusive: number, maxExclusive: number, seed?: number = Math.round(Math.random() * new Date().getTime())): number {
            return seed % (maxExclusive - minInclusive) + minInclusive;
        }
    }
}